import { component$, Slot } from '@builder.io/qwik';
import { type RequestHandler } from '@builder.io/qwik-city';
import { shouldAuth } from '~/server/authn';

export const onRequest: RequestHandler = async (ev) => {
  await shouldAuth(ev);
  await ev.next();
};

export default component$(() => <Slot />);